<%@ page import="com.dingpeikeji.quickdeer.core.modules.orders.entity.TOrders" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>发票申请</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/rentproduct/invoice/orders">发票申请</a></li>
	</ul>
	<form:form id="searchForm" action="${ctx}/rentproduct/invoice/orders" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li>
				<span><label>起始日期：</label></span>
				<input type="text" id="payDateQueryStart" name="payDateQueryStart" maxlength="20" readonly class="input-mini Wdate"
					value="${orders.payDateQueryStart }"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,maxDate:'#F{$dp.$D(\'payDateQueryEnd\')}'});"/>
				至&nbsp;
				<input type="text" id="payDateQueryEnd" name="payDateQueryEnd" maxlength="20" readonly class="input-mini Wdate"
					value="${orders.payDateQueryEnd }"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,minDate:'#F{$dp.$D(\'payDateQueryStart\')}'});"/>
			</li>
			<li class="btns"><input class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>支付日期</th>
				<th>订单金额</th>
				<th>订单类型</th>
				<th>支付方式</th>
				<th>订单状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.list}" var="orders">
			<tr>
				<td><fmt:formatDate value="${orders.payDate }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
				<td>￥${orders.dueamount}</td>
				<td>整车</td>
				<td>${orders.payway}</td>
				<td>已支付</td>
				<td>
					<shiro:hasPermission name="rentproduct:invoice:edit">
						<a href="${ctx}/rentproduct/invoice/make?orderid=${orders.orderid}">开票</a>
					</shiro:hasPermission>
				</td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>